1. Field of the Invention
The invention relates in general to an image processing apparatus and a method thereof, and more particularly to an image edge enhancement apparatus and a method thereof.
2. Description of the Related Art
By adjusting the contrast or brightness of the edge of an object in a display frame, the edge enhancement technology produces a clear outline of an image and makes the object more highlighted and the frame more clearly manifested. Referring to FIG. 1, a pixel and its adjacent pixels are shown. During edge enhancement, whether a pixel pi,j is at an edge of an object is determined, and the brightness of the pixel is adjusted. If the pixel pi,j is at the edge of an object, then the contrast of the pixel is enabled to be higher than its adjacent pixels pi−1,j+1, pi,j+1, pi+1,j+1, pi−1,j, pi+1,j, pi−1,j−1, pi,j−1 and pi+1,j−1.
Referring to FIG. 2, a structural diagram of a conventional edge enhancement circuit is shown. The edge enhancement circuit 200 comprises six registers 210(1)˜(6), a high pass filter 220, a high pass filter 230, a low pass filter 240 and an inquiry unit 250.
The register 210(1) is used for temporarily storing the pixel value xi,j+1. The register 210(2) is used for temporarily storing the pixel value xi+1,j+1. The register 210(3) is used for temporarily storing the pixel value xi,j. The register 210(4) is used for temporarily storing the pixel value xi+1,j. The register 210(5) is used for temporarily storing the pixel value xi,j−1. The register 210(6) is used for temporarily storing the pixel value xi+1,j−1. The pixel values xi,j+1, xi+1,j+1, xi,j, xi+1,j, xi,j−1 and xi+1,j−1 are respectively the values of the pixels pi,j+1, pi+1,j+1, pi,j, pi+1,j, pi,j−1 and pi+1,j−1 at the predetermined color gamut.
The high pass filter 220 receives the pixel values xi−1,j, xi,j and xi+1,j to output a horizontal edge value H1. The high pass filter 230 receives the pixel values xi,j−1, xi,j and xi,j+1, to output a vertical edge value V1. The low pass filter 240 receives a vertical edge value V1 and a horizontal edge value H1, and then outputs a processed value S1. After the inquiry unit 250 receives the processed value S1, an enhanced pixel value xi,j′ of the pixel value xi,j is looked up form the look-up table to be outputted.
According to the above structure, if the pixel pi,j happens to be at a vertical or horizontal edge of an object, then the pixel pi,j will be regarded by the high pass filter 220 and the high pass filter 230 as a pixel at an edge twice. Consequently, the brightness and the contrast of the pixel pi,j opposite to the adjacent pixels are over-enhanced. If the pixel pi,j is a noise, the above structure may be misjudged, causing spots to occur at non-edge parts of the object in the frame and making the frame looked speckled.